/*
* (c) 2014 University of Applied Sciences, Karlsruhe
* Project "Segmentation of depth data of a plenoptic camera"
* summer semester 2014
*
* fit_line_3d_least_squares.h
* This file contains the implementation of the least squares line fitting algorithm.
*/


#ifndef _FIT_LINE_3D_LEAST_SQUARES_H_
#define _FIT_LINE_3D_LEAST_SQUARES_H_

#include "sgBase/geometrics/line_3d.h"
#include "sgMain/3d/fit_line_3d.h"

using namespace sgBase;

namespace sgMain
{
	/**
	Class to fit a 2D line contour in 3D point cloud data using an least squares algorithm.
	*/
	class FitLine3DLeastSquares : public FitLine3D
	{
	protected:
	public:
		FitLine3DLeastSquares(const Line3D &line2D, const pcl::PointCloud<pcl::PointXYZRGB>::Ptr &depthCloud, const cv::Mat &intrinsicParameters, double radius);
		virtual ~FitLine3DLeastSquares();
		virtual int FitLine();
	};
}

#endif